package com.czl.module_storehouse.mvp.presenter;

import com.czl.base.data.bean.tengyun.LocatListBean;
import com.czl.module_base.bean.ListBean;
import com.czl.module_base.http.HttpResponse;
import com.czl.module_base.mvp.presenter.BasePresenter;
import com.czl.module_base.observer.AbsHandleSubscriber;
import com.czl.module_storehouse.mvp.model.SelectedSortModel;
import com.czl.module_storehouse.mvp.view.SelectedSortView;

/**
 * @author by xubin,
 * @date on 2022/2/17.
 * PS: Not easy to write code, please indicate.
 */
public class SelectedSortPresenter extends BasePresenter<SelectedSortModel, SelectedSortView> {

    public void getStorehouseSortStockList(Integer sortId) {
        doSubscribe(mModel.getStorehouseSortStockList(sortId), new AbsHandleSubscriber<HttpResponse<ListBean<LocatListBean>>>(mView) {
            @Override
            public void onSuccess(HttpResponse<ListBean<LocatListBean>> listBeanHttpResponse) {
                mView.showData(listBeanHttpResponse.getData());
            }
        });
    }
}
